﻿
namespace ServiceTests
{
  using System;
  using System.Configuration;

  using NUnit.Framework;

  using UnityRepository.Initializers;

  [TestFixture]
  public class DbConnectionInitializerTests
  {
    private IDbConnectionInitializer dbConnectionInitializer;

    private String ConnectionString { get; set; }

    [SetUp]
    public void SetUp()
    {
      this.ConnectionString = "Test Connection String";

      this.dbConnectionInitializer = new DbConnectionInitializer(this.ConnectionString);
    }

    [Test]
    public void WhenIWantToSetConnectionString_IShouldBeAbleToSet()
    {
      this.dbConnectionInitializer.SetConnectionString(this.ConnectionString);

      Assert.AreEqual(DbConnectionInitializer.ConnectionString, this.ConnectionString);
    }
  }
}
